package com.wfs.javabean;

/**
 * 实体类需满足以下两个要求：
 * 1.类中的成员变量全部私有，并提供public修饰的getter/setter方法
 * 2.类中提供无参构造方法
 * 使用场景：实体类对应的是软件开发里现在比较流行的开发方式，数据和数据的业务处理相分离
 */
public class Student {
    String name;
    int age;
    double math;
    double chinese;

    public Student(String name, int age, double math, double chinese) {
        this.name = name;
        this.age = age;
        this.math = math;
        this.chinese = chinese;
        System.out.println("有参构造方法");
    }

    public Student() {
        this.name = "张三";
        this.age = 18;
        this.math = 90;
        this.chinese = 80;
        System.out.println("无参构造方法");
    }

    public double getChinese() {
        return chinese;
    }

    public void setChinese(double chinese) {
        this.chinese = chinese;
    }

    public double getMath() {
        return math;
    }

    public void setMath(double math) {
        this.math = math;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


}
